package com.kk.nb_car.remote;

import com.woniuxy.boot.common.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: K
 * @Date: 2024/12/14
 */
@FeignClient("nb-auth")
public interface UserService {

    /**
     * 根据用户id获取该用户绑定的车辆数量
     * @param id 用户id
     * @return
     */
    @GetMapping("app/user/getUserById")
    UserDTO getUserById(@RequestParam("id") Long id);

    /**
     * 用户的车辆绑定数量+1
     * @param id 用户id
     */
    @GetMapping("app/user/carNumPlusOne")
    void carNumPlusOne(@RequestParam("id") Long id);
}
